package com.cloud.pole.weixin.biz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ace.cache.annotation.Cache;
import com.cloud.pole.common.biz.BaseBiz;
import com.cloud.pole.mapper.WxPayJoinMapper;
import com.cloud.pole.weixin.model.entity.WxPayJoin;

/**
 * ${DESCRIPTION}
 * @author wanghaobin
 * @create 2017-06-08 16:23
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class WxPayJoinBiz extends BaseBiz<WxPayJoinMapper, WxPayJoin> {
	
	@Autowired
	WxPayJoinMapper wxPayJoinMapper;
	
	@Cache(key="wxPayJoin{1}")
    public WxPayJoin selectByPrimaryKey(Integer id) {
		return wxPayJoinMapper.selectByPrimaryKey(id);
    }
	
	@Cache(key="wxPayJoin:notifyUrl{1}")
    public WxPayJoin selectBynotifyUrl(String notifyUrl) {
		WxPayJoin record = new WxPayJoin();
		record.setNotifyUrl(notifyUrl);
		return wxPayJoinMapper.selectOne(record);
    }
}
